package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallTask;
import com.appkubes.mall.core.po.MallTaskExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallTaskMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallTaskSqlProvider.class, method="countByExample")
    long countByExample(MallTaskExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallTaskSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallTaskExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_task",
        "where task_key = #{taskKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String taskKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_task (task_key, app_key, ",
        "`type`, create_time, ",
        "update_time, memo, ",
        "`state`, `level`, `value`, ",
        "execute_time, execute_times)",
        "values (#{taskKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{type,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{memo,jdbcType=VARCHAR}, ",
        "#{state,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{value,jdbcType=VARCHAR}, ",
        "#{executeTime,jdbcType=INTEGER}, #{executeTimes,jdbcType=INTEGER})"
    })
    int insert(MallTask record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallTaskSqlProvider.class, method="insertSelective")
    int insertSelective(MallTask record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallTaskSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="task_key", property="taskKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="memo", property="memo", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="level", property="level", jdbcType=JdbcType.INTEGER),
        @Result(column="value", property="value", jdbcType=JdbcType.VARCHAR),
        @Result(column="execute_time", property="executeTime", jdbcType=JdbcType.INTEGER),
        @Result(column="execute_times", property="executeTimes", jdbcType=JdbcType.INTEGER)
    })
    List<MallTask> selectByExampleWithRowbounds(MallTaskExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallTaskSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="task_key", property="taskKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="memo", property="memo", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="level", property="level", jdbcType=JdbcType.INTEGER),
        @Result(column="value", property="value", jdbcType=JdbcType.VARCHAR),
        @Result(column="execute_time", property="executeTime", jdbcType=JdbcType.INTEGER),
        @Result(column="execute_times", property="executeTimes", jdbcType=JdbcType.INTEGER)
    })
    List<MallTask> selectByExample(MallTaskExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "task_key, app_key, `type`, create_time, update_time, memo, `state`, `level`, ",
        "`value`, execute_time, execute_times",
        "from mall_task",
        "where task_key = #{taskKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="task_key", property="taskKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="memo", property="memo", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="level", property="level", jdbcType=JdbcType.INTEGER),
        @Result(column="value", property="value", jdbcType=JdbcType.VARCHAR),
        @Result(column="execute_time", property="executeTime", jdbcType=JdbcType.INTEGER),
        @Result(column="execute_times", property="executeTimes", jdbcType=JdbcType.INTEGER)
    })
    MallTask selectByPrimaryKey(String taskKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallTaskSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallTask record, @Param("example") MallTaskExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallTaskSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallTask record, @Param("example") MallTaskExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallTaskSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallTask record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_task
     *
     * @mbg.generated
     */
    @Update({
        "update mall_task",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "`type` = #{type,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "memo = #{memo,jdbcType=VARCHAR},",
          "`state` = #{state,jdbcType=INTEGER},",
          "`level` = #{level,jdbcType=INTEGER},",
          "`value` = #{value,jdbcType=VARCHAR},",
          "execute_time = #{executeTime,jdbcType=INTEGER},",
          "execute_times = #{executeTimes,jdbcType=INTEGER}",
        "where task_key = #{taskKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallTask record);
}